import axios from 'axios'

export function request(config){

    //创建实例
    const instance1 = axios.create({
      baseURL: 'https://www.liulongbin.top:8888/api/private/v1',
      timeout: 10000
    })

  /**
   * 拦截器 interceptor
   */
  instance1.interceptors.request.use(success => {
    console.log("发送请求成功 -> " + success)
    return success
  },error => {
    console.log("发送请求失败 -> " + error)
  })

  instance1.interceptors.response.use(success => {
    console.log("请求响应成功 -> " + success)
    return success
  },error => {
    console.log("请求响应成失败 -> " + error)
  })

    return instance1(config)

}
